package model;

public class ModelConstraintCK extends ModelConstraint 
{
	private final int constraintsNumber = 3;
	//indexes
	private final int C0 = 0;
	private final int C1 = 1;
	private final int C2 = 2;
	
	public ModelConstraintCK(ModelType t0,ModelType t1, ModelType t2)
	{
		super.types = new ModelType[constraintsNumber];
		this.setC0(t0);
		this.setC1(t1);
		this.setC2(t2);
	}
	
	public void setC0(ModelType type)
	{
		super.types[C0] = type;
	}
	
	public void setC1(ModelType type)
	{
		super.types[C1] = type;
	}
	
	public void setC2(ModelType type)
	{
		super.types[C2] = type;
	}
	
	public ModelType getC0()
	{
		return super.types[C0];
	}
	
	public ModelType getC1()
	{
		return super.types[C1];
	}
	
	public ModelType getC2()
	{
		return super.types[C2];
	}
	
	
	public boolean equals(ModelConstraintCK mck) {
		boolean check = false ;
		if(this.getC0().name.equalsIgnoreCase(mck.getC0().name)
			&& this.getC1().name.equalsIgnoreCase(mck.getC1().name)
			&& this.getC2().name.equalsIgnoreCase(mck.getC2().name)
			)
			check = true;
		return check;
	}
}
